package com.example.pinkcat.activity.api;

import android.graphics.Bitmap;
import android.media.Image;

import java.io.File;
import java.io.FileInputStream;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
public interface ApiService {
    // baseUrl  // https://www.site.com/ww?agresTt=dfsd  斜杠结尾

    @POST("login")//登陆
    Call<ResponseBody> login(@Query("username")String phone, @Query("password")String password, @Query("style")String style,@Query("remember-me")String rem);

    @GET("app/regist")//注册
    Call<ResponseBody> register(@Query("phone")String phone, @Query("code")String verification, @Query("password")String password);

    @GET("app/changepassword")//更改密码
    Call<ResponseBody> changePassword(@Query("phone")String phone, @Query("code")String code,@Query("password")String password);

    @GET("app/emailcode")//获取验证码e
    Call<ResponseBody> getVerification_byemail(@Query("email")String email);

    @GET("app/phonecode")//获取验证码
    Call<ResponseBody> getVerification_byphone(@Query("phone")String phone);

    @GET("app/getvideobyid")//根据标签获取视频
    Call<ResponseBody> getvideobyid(@Query("user_id")String user_id);
    @GET("app/getpinkcat")//获取最新app
    Call<ResponseBody> getPinkCat();

    @GET("app/suggest")//提交反馈
    Call<ResponseBody> suggest(@Query("user_id")String user_id, @Query("user_name")String username, @Query("type")String type,@Query("suggest")String suggest,@Query("email")String email);

    @GET("app/getuserinfo")//获取用户信息
    Call<ResponseBody> getUserInfo(@Query("phone_or_email")String phone_or_email, @Query("style")String style);

    @GET("app1/labs")//根据标签获取视频
    Call<ResponseBody> getvideo(@Query("labs")String labs,@Query("video_id")String video_id);

    @GET("app/updateusername")//修改名称
    Call<ResponseBody> updateusername(@Query("user_id")String user_id,@Query("user_name")String user_name);
    @GET("app/updatesex")//修改age
    Call<ResponseBody> updatesex(@Query("user_id")String user_id,@Query("sex")String sex);
    @GET("app/updatedatebirthday")//修改出生日期
    Call<ResponseBody> updatebirthday(@Query("user_id")String user_id,@Query("date_birth")String date_birth);
    @GET("app/updatearea")//修改age
    Call<ResponseBody> updatearea(@Query("user_id")String user_id,@Query("area")String area);
    @GET("app/updateschool")//修改学校
    Call<ResponseBody> updateschool(@Query("user_id")String user_id,@Query("school")String school);
    @Multipart
    @POST("app/updatehead")
    Call<ResponseBody> updateshead(@Query("user_id")String user_id,@Part MultipartBody.Part body);
    @GET("app/bindemail")//修改邮箱
    Call<ResponseBody> bindemail(@Query("user_id")String user_id,@Query("email")String email,@Query("code")String code);

    @GET("app/getuservipinfo")//获取用户vip信息
    Call<ResponseBody> getvipinfo(@Query("user_id")String user_id);
    @GET("app/getvip")//提交vip申请
    Call<ResponseBody> getvip(@Query("user_id")String user_id,@Query("vip_type")String vip_type);//  1--1元天大会员 2--20元月大会员 3--60元年大会员 4--999元永久大会员

    @GET("app/mymoving")//我的动态
    Call<ResponseBody> getmyvideo(@Query("user_id")String user_id);//
    @GET("app/mycollect")//我的收藏
    Call<ResponseBody> getmyfollowvideo(@Query("user_id")String user_id);//

    @GET("app/hehome")//用户页面
    Call<ResponseBody> getuserpageinfo(@Query("user_id")String user_id,@Query("user_user_id")String user_user_id);//

    @GET("app/mykeep")//用户关注列表
    Call<ResponseBody> getmyfollows(@Query("user_id")String user_id);//
    @GET("app/myfan")//用户粉丝列表
    Call<ResponseBody> getmyfans(@Query("user_id")String user_id);//

    @GET("app/keeping")//用户关注
    Call<ResponseBody> follow(@Query("user_id")String user_id,@Query("keep_user_id")String keep_user_id);//
    @GET("app/unkeeping")//用户取消关注
    Call<ResponseBody> unfollow(@Query("user_id")String user_id,@Query("keep_user_id")String keep_user_id);//

    @GET("app/fansearch")//用户关注列表
    Call<ResponseBody> searchfans(@Query("user_id")String user_id,@Query("user_name_or_user_id")String user_name_or_user_id);//
    @GET("app/keepsearch")//用户粉丝列表
    Call<ResponseBody> searchfollow(@Query("user_id")String user_id,@Query("user_name_or_user_id")String user_name_or_user_id);//


    @GET("app1/videoinfo")//普通视频播放页面信息
    Call<ResponseBody> getpalyvideo(@Query("video_id")String video_id, @Query("user_id")String user_id);//

    @GET("app/collect")//收藏
    Call<ResponseBody> followvideo(@Query("user_id")String user_id,@Query("video_id")String keep_user_id);//
    @GET("app/uncollect")//取消收藏
    Call<ResponseBody> unfollowvideo(@Query("user_id")String user_id,@Query("video_id")String keep_user_id);//
    @GET("app/userlike")//收藏
    Call<ResponseBody> likevideo(@Query("user_id")String user_id,@Query("video_id")String keep_user_id);//
    @GET("app/unuserlike")//取消收藏
    Call<ResponseBody> unlickvideo(@Query("user_id")String user_id,@Query("video_id")String keep_user_id);//


    @GET("app1/comment")//获取评论
    Call<ResponseBody> getcomment(@Query("video_id")String video_id);//
    @GET("app/usercomment")//发布评论
    Call<ResponseBody> sendcomment(@Query("video_id")String video_id,@Query("user_id")String user_id,@Query("comment_message")String comment_message);//
    @GET("app1/tvlist")//获取list
    Call<ResponseBody> gettvlistbyid(@Query("video_id")String video_id);//

    //上传视频
    @Multipart
    @POST("app/uploadvideo")
    Call<ResponseBody> uploadvideo(@Part MultipartBody.Part file,
                                   @Part MultipartBody.Part video_cover,
                                   @Query("user_id")String user_id,
                                   @Query("video_name")String video_name,
                                   @Query("video_lab")String video_lab,
                                   @Query("video_part")String video_part,
                                   @Query("video_type")String video_type,
                                   @Query("video_info")String video_info);

    @GET("app1/addplay")//获取评论
    Call<ResponseBody> addplaynum(@Query("video_id")String video_id);//
    @GET("app/commentlikebutton")//点赞评论
    Call<ResponseBody> thumbpl(@Query("comment_id")String comment_id);//
    @GET("app/commentunlikebutton")//点踩评论
    Call<ResponseBody> unthumbpl(@Query("comment_id")String comment_id);//
    @GET("app/commentreport")//举报评论
    Call<ResponseBody> reportcomment(@Query("user_id")String user_id,
                                     @Query("user_name")String user_name,
                                     @Query("comment_message")String comment_message,
                                     @Query("report_content")String report_content,
                                     @Query("comment_id")String comment_id);//

    @GET("app1/searchuser")//查询用户
    Call<ResponseBody> searchuser(@Query("search")String search,@Query("user_id")String user_id);//
    @GET("app1/searchtv")//查询视频 code 1 2 3 中医 动漫 电视剧
    Call<ResponseBody> searchtv(@Query("tv")String tv,@Query("code")int code);//
    @GET("app1/videosearch")//查询视频
    Call<ResponseBody> videosearch(@Query("search")String search);//
    @GET("app1/searchfilm")//查询电影
    Call<ResponseBody> searchfilm(@Query("film")String film);//
}